<h1>Angular Portfolio Items</h1>

<%= link_to "Create New Item", new_portfolio_path if logged_in?(:site_admin)%>

<% @angular_portfolio_items.each do |portfolio_item| %>
	<p><%= link_to portfolio_item.title, portfolio_show_path(portfolio_item.id)	%></p>
	<p><%= portfolio_item.subtitle	%></p>
	<p><%= portfolio_item.body	%></p>
	<%= image_tag portfolio_item.thumb_image unless portfolio_item.thumb_image.nil?	%>
	<%= link_to "Edit", edit_portfolio_path(portfolio_item.id) if logged_in?(:site_admin) %>
	<%= link_to "Delete Portfolio Item", portfolio_path(portfolio_item.id), method: :delete, data: { confirm: 'Are you sure want to delete this portfolio item?' } if logged_in?(:site_admin) %>
<% end %>
